﻿HmJS.$Import('ui.Picker');
//HmJS.$Import('core.domready');

HmJS.register('demo.module.ui.calendar.datepicker.picker', function ($ns) {
	var that = {};

	that.todo = function () {
		// sorry for the global, but this is easier debugging with the console!
		myPicker = new $ns.ui.Picker().position(200, 200);

		$('open').addEvent('click', function (e) {
			e.stop();
			myPicker.open();
		});
		$('close').addEvent('click', function (e) {
			e.stop();
			myPicker.close();
		});
		$('toggle').addEvent('click', function (e) {
			e.stop();
			myPicker.toggle();
		});
	};

	return that;
});
